package stdio.costa.imoca.converter;

import java.util.List;

import stdio.costa.imoca.dto.ActivityListDTO;
import stdio.costa.imoca.model.Activity;

public class Activities2ActivityListWrapper {
	
	public static ActivityListDTO convert(List<Activity> activities) {
		
		if(activities == null){
			return new ActivityListDTO();
		}
		
		ActivityListDTO wrapper = new ActivityListDTO();
		
		wrapper.setActivities(activities);
		
		wrapper.setTotalNumber(activities.size());
		
		return wrapper;
		
	}
}
